Skip to content

perf(routing): single-pass bitmask / unified radix lookup for 405 Method Not Allowed (#139) - #175

Merged
ZhuchkaTriplesix merged 5 commits into
devfrom
perf-single-pass-routing-139
Aug 27, 2026
Merged

perf(routing): single-pass bitmask / unified radix lookup for 405 Method Not Allowed (#139)#175
ZhuchkaTriplesix merged 5 commits into
devfrom
perf-single-pass-routing-139

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #139

  • Added MethodMask bitflags for HTTP methods and all_paths: Router<MethodMask> to CompiledRouters.
  • Maintained path_method_masks in AppState mapping registered path templates to their cumulative allowed method bitmask.
  • Updated methods_matching_path_compiled to perform a single O(K) radix lookup on all_paths rather than up to 7 separate router lookups.
  • Reduced 405 Method Not Allowed and 404 Not Found resolution overhead.

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 1417de8 into dev Aug 27, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant